package com.longdaji.decoration.bean;

import android.text.TextUtils;

/**
 * Created by Kanade on 2018/3/13 0013.
 */

public class Account {

    private static volatile Account instance;

    /**
     * userid : e991ac79714c4f698f58d3498685eed7
     * username : mytest102
     * name : aaaaaaa
     * telephone : 13041025596
     * password : 7c222fb2927d828af22f592134e8932480637c0d
     * registerTime : null
     * loginTime : null
     * sign : null
     * remark : null
     * constellation : null
     * gender : null
     * headImgLocation : null
     * credits : null
     * campusName : null
     * dormitoryId : null
     * dormitoryName : null
     * isCaptain : null
     * isGraduate : null
     * delFlag : null
     */


    public Account() {

    }

    public static Account getInstance() {
        if (instance == null) {
            synchronized (Account.class) {
                if (instance == null) {
                    instance = new Account();
                }
            }
        }
        return instance;
    }

    public static void setInstance(Account account) {
        instance = account;
    }


    private String userid;
    private String username;
    private String name;
    private String telephone;
    private String password;
    private String registerTime;
    private String loginTime;
    private String sign;
    private String remark;
    private String constellation;
    private String gender;
    private String headImgLocation;
    private int credits;
    private String campusName;
    private String dormitoryId;
    private String dormitoryName;
    private String isCaptain;
    private int isGraduate;
    private String delFlag;
    private String inviteCode;
    private String token;

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(String registerTime) {
        this.registerTime = registerTime;
    }

    public String getLoginTime() {
        return loginTime;
    }

    public void setLoginTime(String loginTime) {
        this.loginTime = loginTime;
    }

    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getConstellation() {
        return constellation;
    }

    public void setConstellation(String constellation) {
        this.constellation = constellation;
    }

    public String getGender() {
        if (TextUtils.equals("0", gender)) {
            return "男";
        } else {
            return "女";
        }
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getHeadImgLocation() {
        return headImgLocation;
    }

    public void setHeadImgLocation(String headImgLocation) {
        this.headImgLocation = headImgLocation;
    }

    public int getCredits() {
        return credits;
    }

    public void setCredits(int credits) {
        this.credits = credits;
    }

    public String getCampusName() {
        return campusName;
    }

    public void setCampusName(String campusName) {
        this.campusName = campusName;
    }

    public String getDormitoryId() {
        return dormitoryId;
    }

    public void setDormitoryId(String dormitoryId) {
        this.dormitoryId = dormitoryId;
    }

    public String getDormitoryName() {
        return dormitoryName;
    }

    public void setDormitoryName(String dormitoryName) {
        this.dormitoryName = dormitoryName;
    }

    public String getIsCaptain() {
        return isCaptain;
    }

    public void setIsCaptain(String isCaptain) {
        this.isCaptain = isCaptain;
    }

    public int getIsGraduate() {
        return isGraduate;
    }

    public void setIsGraduate(int isGraduate) {
        this.isGraduate = isGraduate;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getInviteCode() {
        return inviteCode;
    }

    public void setInviteCode(String inviteCode) {
        this.inviteCode = inviteCode;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @Override
    public String toString() {
        return "Account{" +
                "userid='" + userid + '\'' +
                ", username='" + username + '\'' +
                ", name='" + name + '\'' +
                ", telephone='" + telephone + '\'' +
                ", password='" + password + '\'' +
                ", registerTime='" + registerTime + '\'' +
                ", loginTime='" + loginTime + '\'' +
                ", sign='" + sign + '\'' +
                ", remark='" + remark + '\'' +
                ", constellation='" + constellation + '\'' +
                ", gender='" + gender + '\'' +
                ", headImgLocation='" + headImgLocation + '\'' +
                ", credits=" + credits +
                ", campusName='" + campusName + '\'' +
                ", dormitoryId='" + dormitoryId + '\'' +
                ", dormitoryName='" + dormitoryName + '\'' +
                ", isCaptain='" + isCaptain + '\'' +
                ", isGraduate=" + isGraduate +
                ", delFlag='" + delFlag + '\'' +
                ", inviteCode='" + inviteCode + '\'' +
                ", token='" + token + '\'' +
                '}';
    }
}
